#include "controlDevice.h"
#include <stdlib.h>

beffInit(int pinNum)
{
  pinMode(pinNum, OUTPUT);
  digitalWrite(pinNum, HIGH);
};
openBeef(int pinNum)
{
  digitalWrite(pinNum, LOW);
};
closeBeef(int pinNum)
{
  digitalWrite(pinNum, HIGH);
};

struct Devices beef = {
    .devicesName = "beef",
    .pinNum = 9,
    .deviceInit = beffInit,
    .open = openBeef,
    .close = closeBeef,

};
struct Devices *addBeefToDeviceLink(struct Devices *pthead)
{
  if (pthead == NULL)
  {
    return &beef;
  }
  else
  {

    beef.next = pthead;
    pthead = &beef;
    return pthead;
  }
}
